There is known a scanner that detects a patch code including a plurality of types of quadrangles having different widths each other. When one sheet includes a patch code among the plurality of document sheets, the scanner divides scan data successively representing the plurality of document sheets by data for one sheet including the patch code. When the sheet of documents does not includes the patch code, the scanner does not perform such division or classification process.